Some details:
Identifiers surrounded by percent signs (eg %name%) get turned into a template node type for subsequent replacement.
Example template:
class %orb_name%:
def compute_value(self,alpha,v,r2):
x=v[0]
y=v[1]
z=v[2]
%value%
return val
The code replaces %orb_name% with the orbital name (s,px,py,px,etc) and %value% gets replaced with the expression for the value of the orbital (the methods for the derivatives not shown - see codegen/primitive_gaussian/deriv.py in SVN for the full template.)
No comments:
Post a Comment